package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.service.INursingProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.zzyl.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/member/orders/project")
@Api(tags = "服务项接口")
public class NursingMemberController extends BaseController {

    @Autowired
    private INursingProjectService nursingProjectService;

    @GetMapping("/page")
    public TableDataInfo<NursingProject> page(String name,Integer pageNum,Integer pageSize,Integer status)
    {
        return nursingProjectService.pageNumAndPageSize(name,pageNum,pageSize,status);

    }

    @GetMapping("/{id}")
    public R<NursingProject> getInfo(@ApiParam("护理项目ID") @PathVariable("id") Long id)
    {
        return R.ok(nursingProjectService.selectNursingProjectById(id));
    }

}
